package com.xiaochong.tir.api.controller;

import com.xiaochong.tir.api.service.SeoSiteMapService;
import com.xiaochong.tir.api.util.ApiVersion;
import com.xiaochong.tir.common.data.vo.ApiResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description: 站点地图
 * @Author: org
 * @CreateDate: 2018/8/13 9:20
 */
@Api(value="站点地图")
@RestController
@RequestMapping(ApiVersion.API_V1_PREFIX+"/map")
public class SeoSiteMapController {

    @Autowired
    private SeoSiteMapService seoSiteMapService;

    @ApiOperation(value = "站点地图-货币", notes = "返回code：1000-成功；2000-无数据；5000-查询失败；3000-参数错误")
    @PostMapping("/getCoinUrlList")
    public ApiResultVo getCoinUrlList(){
        return seoSiteMapService.getCoinUrlList();
    }
    @ApiOperation(value = "站点地图-交易对", notes = "返回code：1000-成功；2000-无数据；5000-查询失败；3000-参数错误")
    @PostMapping("/getPairUrlList")
    public ApiResultVo getPairUrlList(){
        return seoSiteMapService.getPairUrlList();
    }
    @ApiOperation(value = "站点地图-交易对搜索id", notes = "返回code：1000-成功；2000-无数据；5000-查询失败；3000-参数错误")
    @PostMapping("/getExchangeInfoByPairName")
    public ApiResultVo getExchangeInfoByPairName(@RequestParam(value = "exchangeName")String exchangeName,@RequestParam(value = "pairName")String pairName){
        return seoSiteMapService.getExchangeInfoByPairName(exchangeName,pairName);
    }
    @ApiOperation(value = "站点地图-概念", notes = "返回code：1000-成功；2000-无数据；5000-查询失败；3000-参数错误")
    @PostMapping("/getConceptUrlList")
    public ApiResultVo getConceptUrlList(){
        return seoSiteMapService.getConceptUrlList();
    }
}
